﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BingVis.GoogleTransit
{
    public static class StopColorLookup
    {
        private static Dictionary<string, List<string>> stopColorLookup = new Dictionary<string, List<string>>()
        {
            { "lechmeregreen line", new List<string>() { "#427B1D", } },
            { "science parkgreen line", new List<string>() { "#427B1D", } },
            { "northgreen line", new List<string>() { "#427B1D", } },
            { "haymarketgreen line", new List<string>() { "#427B1D", } },
            { "government centergreen line westbound", new List<string>() { "#427B1D", } },
            { "park stgreen lineb berth", new List<string>() { "#427B1D", } },
            { "boylston", new List<string>() { "#427B1D", } },
            { "arlington", new List<string>() { "#427B1D", } },
            { "copley", new List<string>() { "#427B1D", } },
            { "hynes", new List<string>() { "#427B1D", } },
            { "kenmore", new List<string>() { "#427B1D", } },
            { "blandford st", new List<string>() { "#427B1D", } },
            { "boston univ east", new List<string>() { "#427B1D", } },
            { "boston univ central", new List<string>() { "#427B1D", } },
            { "boston univ westgreen line b", new List<string>() { "#427B1D", } },
            { "saint paul st", new List<string>() { "#427B1D", } },
            { "pleasant st", new List<string>() { "#427B1D", } },
            { "babcock st", new List<string>() { "#427B1D", } },
            { "packards corner", new List<string>() { "#427B1D", } },
            { "harvard avewestbound", new List<string>() { "#427B1D", } },
            { "griggs st", new List<string>() { "#427B1D", } },
            { "allston st", new List<string>() { "#427B1D", } },
            { "warren st", new List<string>() { "#427B1D", } },
            { "washington st", new List<string>() { "#427B1D", } },
            { "sutherland rd", new List<string>() { "#427B1D", } },
            { "chiswick rdgreen line b", new List<string>() { "#427B1D", } },
            { "chestnut hill ave", new List<string>() { "#427B1D", } },
            { "south st", new List<string>() { "#427B1D", } },
            { "boston collegegreen line", new List<string>() { "#427B1D", } },
            { "boston college", new List<string>() { "#427B1D", } },
            { "chiswick rd", new List<string>() { "#427B1D", } },
            { "harvard ave", new List<string>() { "#427B1D", } },
            { "boston univ west", new List<string>() { "#427B1D", } },
            { "blanford st", new List<string>() { "#427B1D", } },
            { "park stgreen line eastbound", new List<string>() { "#427B1D", } },
            { "government centergreen line eastbound", new List<string>() { "#427B1D", } },
            { "park stgreen linec branch berth", new List<string>() { "#427B1D", } },
            { "saint mary st", new List<string>() { "#427B1D", } },
            { "hawes st", new List<string>() { "#427B1D", } },
            { "kent st", new List<string>() { "#427B1D", } },
            { "coolidge corner", new List<string>() { "#427B1D", } },
            { "summit ave", new List<string>() { "#427B1D", } },
            { "brandon hall", new List<string>() { "#427B1D", } },
            { "fairbanks st", new List<string>() { "#427B1D", } },
            { "washington sq", new List<string>() { "#427B1D", } },
            { "tappan st", new List<string>() { "#427B1D", } },
            { "dean rd", new List<string>() { "#427B1D", } },
            { "englewood ave", new List<string>() { "#427B1D", } },
            { "cleveland circle platform", new List<string>() { "#427B1D", } },
            { "park stgreen lined branch berth", new List<string>() { "#427B1D", } },
            { "fenway", new List<string>() { "#427B1D", } },
            { "longwood", new List<string>() { "#427B1D", } },
            { "brookline village", new List<string>() { "#427B1D", } },
            { "brookline hills", new List<string>() { "#427B1D", } },
            { "beaconsfield", new List<string>() { "#427B1D", } },
            { "reservoir", new List<string>() { "#427B1D", } },
            { "chestnut hill", new List<string>() { "#427B1D", } },
            { "newton centre", new List<string>() { "#427B1D", } },
            { "newton highlands", new List<string>() { "#427B1D", } },
            { "eliot", new List<string>() { "#427B1D", } },
            { "waban", new List<string>() { "#427B1D", } },
            { "woodland", new List<string>() { "#427B1D", } },
            { "riversidegreen line", new List<string>() { "#427B1D", } },
            { "riverside", new List<string>() { "#427B1D", } },
            { "park stgreen linee line berth", new List<string>() { "#427B1D", } },
            { "prudential", new List<string>() { "#427B1D", } },
            { "symphony", new List<string>() { "#427B1D", } },
            { "northeastern", new List<string>() { "#427B1D", } },
            { "museum of fine arts", new List<string>() { "#427B1D", } },
            { "longwood med area", new List<string>() { "#427B1D", } },
            { "brigham circle", new List<string>() { "#427B1D", } },
            { "fenwood rd", new List<string>() { "#427B1D", } },
            { "mission park", new List<string>() { "#427B1D", } },
            { "riverway", new List<string>() { "#427B1D", } },
            { "back of hill", new List<string>() { "#427B1D", } },
            { "heath st platformgreen line e", new List<string>() { "#427B1D", } },
            { "oak groveorange line", new List<string>() { "#E87200", } },
            { "malden", new List<string>() { "#E87200", } },
            { "wellington", new List<string>() { "#E87200", } },
            { "sullivan", new List<string>() { "#E87200", } },
            { "community college", new List<string>() { "#E87200", } },
            { "north", new List<string>() { "#E87200", } },
            { "haymarket", new List<string>() { "#E87200", } },
            { "state st orange line to forest hills", new List<string>() { "#E87200", } },
            { "downtown crossingto forest hills", new List<string>() { "#E87200", } },
            { "chinatown", new List<string>() { "#E87200", } },
            { "ne medical ctr", new List<string>() { "#E87200", } },
            { "back bay", new List<string>() { "#E87200", } },
            { "massachusetts ave sta", new List<string>() { "#E87200", } },
            { "ruggles sta", new List<string>() { "#E87200", } },
            { "roxbury xng", new List<string>() { "#E87200", } },
            { "jackson sq", new List<string>() { "#E87200", } },
            { "stoneybrook", new List<string>() { "#E87200", } },
            { "green street", new List<string>() { "#E87200", } },
            { "forest hills orange line", new List<string>() { "#E87200", } },
            { "green st", new List<string>() { "#E87200", } },
            { "jackson sq orange line", new List<string>() { "#E87200", } },
            { "back bay sta", new List<string>() { "#E87200", } },
            { "downtown crossingto oak grove", new List<string>() { "#E87200", } },
            { "state stto oak grove", new List<string>() { "#E87200", } },
            { "ashmont red line", new List<string>() { "#E12D27", } },
            { "shawmut", new List<string>() { "#E12D27", } },
            { "fields corner", new List<string>() { "#E12D27", } },
            { "savin hill", new List<string>() { "#E12D27", } },
            { "jfk/umass ashmont line", new List<string>() { "#E12D27", } },
            { "andrew sq", new List<string>() { "#E12D27", } },
            { "broadway", new List<string>() { "#E12D27", } },
            { "south", new List<string>() { "#E12D27", } },
            { "downtown crossingto alewife", new List<string>() { "#E12D27", } },
            { "park stto alewife", new List<string>() { "#E12D27", } },
            { "charles/mgh", new List<string>() { "#E12D27", } },
            { "kendall/mit", new List<string>() { "#E12D27", } },
            { "central sq", new List<string>() { "#E12D27", } },
            { "harvard", new List<string>() { "#E12D27", } },
            { "porter sq", new List<string>() { "#E12D27", } },
            { "davis square", new List<string>() { "#E12D27", } },
            { "alewife red line", new List<string>() { "#E12D27", } },
            { "davis sq", new List<string>() { "#E12D27", } },
            { "park stto ashmont/braintree", new List<string>() { "#E12D27", } },
            { "downtown crossingto ashmont/braintree", new List<string>() { "#E12D27", } },
            { "jfk/umass ashmont", new List<string>() { "#E12D27", } },
            { "ashmontred line", new List<string>() { "#E12D27", } },
            { "braintree red line platform", new List<string>() { "#E12D27", } },
            { "quincy adams", new List<string>() { "#E12D27", } },
            { "quincy center", new List<string>() { "#E12D27", } },
            { "wollaston red line", new List<string>() { "#E12D27", } },
            { "no quincy", new List<string>() { "#E12D27", } },
            { "jkf/umass braintree", new List<string>() { "#E12D27", } },
            { "jfk/umass braintree", new List<string>() { "#E12D27", } },
            { "no quincy staion", new List<string>() { "#E12D27", } },
            { "wollaston", new List<string>() { "#E12D27", } },
            { "wonderland blue line", new List<string>() { "#2F5DA6", } },
            { "revere beach", new List<string>() { "#2F5DA6", } },
            { "beachmont", new List<string>() { "#2F5DA6", } },
            { "suffolk downs", new List<string>() { "#2F5DA6", } },
            { "orient heigts", new List<string>() { "#2F5DA6", } },
            { "wood island", new List<string>() { "#2F5DA6", } },
            { "airportblue line", new List<string>() { "#2F5DA6", } },
            { "maverick", new List<string>() { "#2F5DA6", } },
            { "aquarium", new List<string>() { "#2F5DA6", } },
            { "state stto bowdoin", new List<string>() { "#2F5DA6", } },
            { "government centerto bowdoin staion", new List<string>() { "#2F5DA6", } },
            { "government ctrto wonderland", new List<string>() { "#2F5DA6", } },
            { "state stblue line eastbound", new List<string>() { "#2F5DA6", } },
            { "airport", new List<string>() { "#2F5DA6", } },
            { "bowdoin blue line", new List<string>() { "#2F5DA6", } },
        };

        public static List<string> GetStopColors(string stopName)
        {
            if (stopColorLookup.ContainsKey(stopName))
            {
                return stopColorLookup[stopName];
            }

            return new List<string>();
        }

        public static string GetRouteFromColor(string color)
        {            
            switch (color.ToUpper().Trim(" #".ToCharArray()))
            {
                case "427B1D":
                    return "green";
                case "E12D27":
                    return "red";
                case "E87200":
                    return "orange";
                case "2F5DA6":
                    return "blue";               
                default:
                    return "";                    
            }
        }
    }
}
